[Ivy]
[>Created: Thu Aug 07 14:45:19 ICT 2014]
1478620B1A5B5818 3.17 #module
>Proto >Proto Collection #zClass
Ls0 LoginProcess Big #zClass
Ls0 RD #cInfo
Ls0 #process
Ls0 @TextInP .ui2RdDataAction .ui2RdDataAction #zField
Ls0 @TextInP .rdData2UIAction .rdData2UIAction #zField
Ls0 @TextInP .resExport .resExport #zField
Ls0 @TextInP .type .type #zField
Ls0 @TextInP .processKind .processKind #zField
Ls0 @AnnotationInP-0n ai ai #zField
Ls0 @TextInP .xml .xml #zField
Ls0 @TextInP .responsibility .responsibility #zField
Ls0 @RichDialogInitStart f0 '' #zField
Ls0 @RichDialogProcessEnd f1 '' #zField
Ls0 @RichDialogProcessStart f5 '' #zField
Ls0 @RichDialogProcessEnd f6 '' #zField
Ls0 @GridStep f8 '' #zField
Ls0 @PushWFArc f9 '' #zField
Ls0 @Alternative f10 '' #zField
Ls0 @GridStep f12 '' #zField
Ls0 @PushWFArc f16 '' #zField
Ls0 @PushWFArc f13 '' #zField
Ls0 @RichDialog f14 '' #zField
Ls0 @PushWFArc f7 '' #zField
Ls0 @PushWFArc f15 '' #zField
Ls0 @RichDialog f18 '' #zField
Ls0 @PushWFArc f19 '' #zField
Ls0 @PushWFArc f17 '' #zField
Ls0 @CallSub f20 '' #zField
Ls0 @PushWFArc f21 '' #zField
Ls0 @PushWFArc f11 '' #zField
Ls0 @PushWFArc f2 '' #zField
>Proto Ls0 Ls0 LoginProcess #zField
Ls0 f0 guid 1478620B1C2B158C #txt
Ls0 f0 type axonactive.vision.training.Login.LoginData #txt
Ls0 f0 method start() #txt
Ls0 f0 disableUIEvents true #txt
Ls0 f0 inParameterDecl 'ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent methodEvent = event as ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent;
<> param = methodEvent.getInputArguments();
' #txt
Ls0 f0 outParameterDecl '<> result;
' #txt
Ls0 f0 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>start()</name>
    </language>
</elementInfo>
' #txt
Ls0 f0 86 54 20 20 13 0 #rect
Ls0 f0 @|RichDialogInitStartIcon #fIcon
Ls0 f1 type axonactive.vision.training.Login.LoginData #txt
Ls0 f1 86 166 20 20 13 0 #rect
Ls0 f1 @|RichDialogProcessEndIcon #fIcon
Ls0 f5 guid 1478637FFD1B9ADB #txt
Ls0 f5 type axonactive.vision.training.Login.LoginData #txt
Ls0 f5 actionDecl 'axonactive.vision.training.Login.LoginData out;
' #txt
Ls0 f5 actionTable 'out=in;
' #txt
Ls0 f5 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>onClickSubmit</name>
        <nameStyle>13,5,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Ls0 f5 246 54 20 20 13 0 #rect
Ls0 f5 @|RichDialogProcessStartIcon #fIcon
Ls0 f6 type axonactive.vision.training.Login.LoginData #txt
Ls0 f6 246 406 20 20 13 0 #rect
Ls0 f6 @|RichDialogProcessEndIcon #fIcon
Ls0 f8 actionDecl 'axonactive.vision.training.Login.LoginData out;
' #txt
Ls0 f8 actionTable 'out=in;
' #txt
Ls0 f8 actionCode 'import ch.ivyteam.ivy.security.IRole;

in.isSuccess = false;
if(ivy.session.loginSessionUser(in.username,in.password)){
	in.isSuccess = true;
	in.fullname = ivy.session.getSessionUser().getFullName();
	List<IRole> listRoles = ivy.session.getSessionUser().getRoles();
	for(int i=0; i<listRoles.size(); i++){
		if(listRoles.get(i).getName().equalsIgnoreCase("Teacher")){
			in.role = "Teacher";
		}	else if(listRoles.get(i).getName().equalsIgnoreCase("Student")){
			in.role = "Student";
		}	
	}
}' #txt
Ls0 f8 type axonactive.vision.training.Login.LoginData #txt
Ls0 f8 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>checkLogin</name>
        <nameStyle>10,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Ls0 f8 238 116 36 24 20 -2 #rect
Ls0 f8 @|StepIcon #fIcon
Ls0 f9 expr out #txt
Ls0 f9 256 74 256 116 #arcP
Ls0 f10 type axonactive.vision.training.Login.LoginData #txt
Ls0 f10 242 242 28 28 14 0 #rect
Ls0 f10 @|AlternativeIcon #fIcon
Ls0 f12 actionDecl 'axonactive.vision.training.Login.LoginData out;
' #txt
Ls0 f12 actionTable 'out=in;
' #txt
Ls0 f12 actionCode 'import org.primefaces.context.RequestContext;

RequestContext.getCurrentInstance().execute("dialogLogin.show()");' #txt
Ls0 f12 type axonactive.vision.training.Login.LoginData #txt
Ls0 f12 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>showErrorDialog</name>
        <nameStyle>15,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Ls0 f12 367 309 34 23 20 -2 #rect
Ls0 f12 @|StepIcon #fIcon
Ls0 f16 expr out #txt
Ls0 f16 384 331 266 416 #arcP
Ls0 f16 1 384 416 #addKink
Ls0 f16 1 0.18692574544147417 0 0 #arcLabel
Ls0 f13 expr in #txt
Ls0 f13 outCond !in.isSuccess #txt
Ls0 f13 270 256 384 308 #arcP
Ls0 f13 1 384 256 #addKink
Ls0 f13 0 0.8615906827865247 0 0 #arcLabel
Ls0 f14 targetWindow NEW:card: #txt
Ls0 f14 targetDisplay TOP #txt
Ls0 f14 richDialogId axonactive.vision.training.TeacherOverview #txt
Ls0 f14 startMethod start(String,String,axonactive.vision.training.entity.User) #txt
Ls0 f14 type axonactive.vision.training.Login.LoginData #txt
Ls0 f14 requestActionDecl '<String fullname, String role, axonactive.vision.training.entity.User user> param;' #txt
Ls0 f14 requestMappingAction 'param.fullname=in.fullname;
param.role=in.role;
param.user=in.user;
' #txt
Ls0 f14 responseActionDecl 'axonactive.vision.training.Login.LoginData out;
' #txt
Ls0 f14 responseMappingAction 'out=in;
' #txt
Ls0 f14 windowConfiguration '* ' #txt
Ls0 f14 isAsynch false #txt
Ls0 f14 isInnerRd true #txt
Ls0 f14 userContext '* ' #txt
Ls0 f14 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>Teacher page</name>
        <nameStyle>12,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Ls0 f14 238 340 36 24 20 -2 #rect
Ls0 f14 @|RichDialogIcon #fIcon
Ls0 f7 expr out #txt
Ls0 f7 256 364 256 406 #arcP
Ls0 f15 expr in #txt
Ls0 f15 outCond in.role.equalsIgnoreCase("teacher") #txt
Ls0 f15 256 270 256 340 #arcP
Ls0 f18 targetWindow NEW:card: #txt
Ls0 f18 targetDisplay TOP #txt
Ls0 f18 richDialogId axonactive.vision.training.StudentOverview #txt
Ls0 f18 startMethod start(String,String,axonactive.vision.training.entity.User) #txt
Ls0 f18 type axonactive.vision.training.Login.LoginData #txt
Ls0 f18 requestActionDecl '<String fullname, String role, axonactive.vision.training.entity.User user> param;' #txt
Ls0 f18 requestMappingAction 'param.fullname=in.fullname;
param.role=in.role;
param.user=in.user;
' #txt
Ls0 f18 responseActionDecl 'axonactive.vision.training.Login.LoginData out;
' #txt
Ls0 f18 responseMappingAction 'out=in;
' #txt
Ls0 f18 windowConfiguration '* ' #txt
Ls0 f18 isAsynch false #txt
Ls0 f18 isInnerRd true #txt
Ls0 f18 userContext '* ' #txt
Ls0 f18 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>Student page</name>
        <nameStyle>12,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Ls0 f18 143 276 35 24 20 -2 #rect
Ls0 f18 @|RichDialogIcon #fIcon
Ls0 f19 expr in #txt
Ls0 f19 242 256 159 276 #arcP
Ls0 f19 1 159 256 #addKink
Ls0 f19 1 0.1420477027474839 0 0 #arcLabel
Ls0 f17 expr out #txt
Ls0 f17 159 300 246 416 #arcP
Ls0 f17 1 159 416 #addKink
Ls0 f17 1 0.23966517832702366 0 0 #arcLabel
Ls0 f20 type axonactive.vision.training.Login.LoginData #txt
Ls0 f20 processCall 'Functional Processes/DataAccess/UserDAS:getUserByCode(String)' #txt
Ls0 f20 doCall true #txt
Ls0 f20 requestActionDecl '<java.lang.String code> param;
' #txt
Ls0 f20 requestMappingAction 'param.code=in.username;
' #txt
Ls0 f20 responseActionDecl 'axonactive.vision.training.Login.LoginData out;
' #txt
Ls0 f20 responseMappingAction 'out=in;
out.user=result.user;
' #txt
Ls0 f20 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>getUserByCode(String)</name>
        <nameStyle>21,5,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Ls0 f20 238 180 36 24 20 -2 #rect
Ls0 f20 @|CallSubIcon #fIcon
Ls0 f21 expr out #txt
Ls0 f21 256 140 256 180 #arcP
Ls0 f11 expr out #txt
Ls0 f11 256 204 256 242 #arcP
Ls0 f2 expr out #txt
Ls0 f2 96 74 96 166 #arcP
>Proto Ls0 .type axonactive.vision.training.Login.LoginData #txt
>Proto Ls0 .processKind HTML_DIALOG #txt
>Proto Ls0 -8 -8 16 16 16 26 #rect
>Proto Ls0 '' #fIcon
Ls0 f5 mainOut f9 tail #connect
Ls0 f9 head f8 mainIn #connect
Ls0 f12 mainOut f16 tail #connect
Ls0 f16 head f6 mainIn #connect
Ls0 f13 head f12 mainIn #connect
Ls0 f10 out f13 tail #connect
Ls0 f14 mainOut f7 tail #connect
Ls0 f7 head f6 mainIn #connect
Ls0 f10 out f15 tail #connect
Ls0 f15 head f14 mainIn #connect
Ls0 f10 out f19 tail #connect
Ls0 f19 head f18 mainIn #connect
Ls0 f18 mainOut f17 tail #connect
Ls0 f17 head f6 mainIn #connect
Ls0 f8 mainOut f21 tail #connect
Ls0 f21 head f20 mainIn #connect
Ls0 f20 mainOut f11 tail #connect
Ls0 f11 head f10 in #connect
Ls0 f0 mainOut f2 tail #connect
Ls0 f2 head f1 mainIn #connect
